public class Solution1480 {
    public int[] runningSum(int[] nums) {
        for (int i=1;i<nums.length;i++){
            nums[i]=nums[i-1]+nums[i];
        }
        return nums;
    }

    public static void main(String[] args) {
        System.out.println(new Solution1480().runningSum(new int[]{1,2,3,4})[3]);
    }
}
